Skip to content

fix: handle null start state in pie leap#299

Merged
xile611 merged 3 commits intodevelopfrom
fix/pie-leap-null-start
Apr 9, 2026
Merged

fix: handle null start state in pie leap#299
xile611 merged 3 commits intodevelopfrom
fix/pie-leap-null-start

Conversation

@xile611
Copy link
Copy Markdown
Contributor

@xile611 xile611 commented Apr 9, 2026

Summary

  • normalize PieLeap input so the animation can handle a null start arc
  • derive the off-screen starting geometry from normalized values instead of reading from.x / from.y directly
  • add a unit test covering the null from case that reproduced the BugServer failure

Testing

  • npm test -- --runInBand in packages/vstory-animate

Context

This fixes the BugServer animate/pie-leap runtime error: Cannot read properties of null (reading 'y').

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a runtime crash in the PieLeap custom animation when the starting arc (from) is null, by normalizing inputs and adding a regression unit test.

Changes:

  • Add normalization logic so PieLeap can safely handle null/partial from/to props.
  • Compute the off-screen starting geometry from normalized values instead of directly reading from.x/from.y.
  • Add a unit test covering the null from case.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/vstory-animate/src/customAnimates/pie-leap.ts Normalize from/to inputs and derive start geometry from normalized props to avoid null dereferences.
packages/vstory-animate/tests/unit/index.test.ts Add regression test ensuring PieLeap doesn’t crash when from is null.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/vstory-animate/src/customAnimates/pie-leap.ts
Comment thread packages/vstory-animate/__tests__/unit/index.test.ts Outdated
xile611 and others added 2 commits April 9, 2026 15:45
@xile611 xile611 merged commit 55740aa into develop Apr 9, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants